/*
 * @Descripttion:
 * @version:
 * @Author: 尹伊
 * @Date: 2019-07-12 09:10:43
 * @LastEditors: 尹伊
 * @LastEditTime: 2020-05-24 17:21:54
 */
import Vue from "vue";
import Router from "vue-router";

Vue.use(Router);

export default new Router({
  mode: "history",
  routes: [
    {
      path: "/index",
      name: "index",
      redirect: "/home",
      component: resolve => require(["@/pages"], resolve),
      children: [
        {
          path: "/home",
          name: "home",
          component: resolve => require(["@/pages/Home"], resolve)
        },
        {
          path: "/market",
          name: "market",
          component: resolve => require(["@/pages/Market"], resolve)
        },
        {
          path: "/live",
          name: "live",
          component: resolve => require(["@/pages/Live"], resolve)
        },
        {
          path: "/my",
          name: "my",
          component: resolve => require(["@/pages/My"], resolve)
        },
        {
          path: "/newcategory",
          name: "newcategory",
          component: resolve => require(["@/pages/NewCategory"], resolve)
        },
        {
          path: "/",
          name: "test",
          component: resolve => require(["@/pages/test"], resolve)
        },
        {
          path: "/cx",
          name: "cx",
          component: resolve => require(["@/pages/cx"], resolve)
        }
      ]
    },
    {
      path: "/newcategory",
      name: "newcategory",
      component: resolve => require(["@/pages/NewCategory"], resolve)
    },
    {
      path: "/",
      name: "test",
      component: resolve => require(["@/pages/test"], resolve)
    },
    {
      path: "/spreadJs",
      name: "spreadJs",
      component: resolve => require(["@/pages/spreadJs"], resolve)
    },
    {
      path: "/reportForm",
      name: "reportForm",
      component: resolve => require(["@/pages/reportForm"], resolve)
    },
    {
      path: "/exalFrom",
      name: "/exalFrom",
      component: resolve => require(["@/pages/exalFrom"], resolve)
    },
    {
      path: "/importPage",
      name: "/importPage",
      component: resolve => require(["@/pages/importPage"], resolve)
    },
    {
      path: "/echartsMap",
      name: "/echartsMap",
      component: resolve => require(["@/pages/echartsMap"], resolve)
    },
    {
      path: "/pieEchars",
      name: "/pieEchars",
      component: resolve => require(["@/pages/pieEchars"], resolve),
      meta: {
        title: "Echart图"
      }
    },
    {
      path: "/elementPercent",
      name: "elementPercent",
      component: resolve => require(["@/pages/elementPercent"], resolve),
      meta: {
        title: "element中的百分比图"
      }
    },
    {
      path: "/drag",
      name: "/drag",
      component: resolve => require(["@/pages/drag"], resolve),
      meta: {
        title: "拖拽缩放功能"
      }
    },
    {
      path: "/countAni",
      name: "countAni",
      component: resolve => require(["@/pages/countAni"], resolve),
      meta: {
        title: "数字动画"
      }
    }
  ]
});
